@import "./alert.vars";

// Alert
// --------------------------------------------------

ion-alert {
  @include font-smoothing();
  @include position(0, 0, 0, 0);

  position: fixed;

  z-index: $z-index-overlay;

  display: flex;

  align-items: center;
  justify-content: center;

  touch-action: none;

  contain: strict;
}

ion-alert.alert-top {
  @include padding(50px, null, null, null);

  align-items: flex-start;
}

.alert-wrapper {
  z-index: $z-index-overlay-wrapper;
  display: flex;

  flex-direction: column;

  min-width: $alert-min-width;
  max-height: $alert-max-height;

  opacity: 0;

  contain: content;
}

.alert-title {
  @include margin(0);
  @include padding(0);
}

.alert-sub-title {
  @include margin(5px, 0, 0);
  @include padding(0);

  font-weight: normal;
}

.alert-message {
  box-sizing: border-box;

  -webkit-overflow-scrolling: touch;

  overflow-y: scroll;

  overscroll-behavior-y: contain;
}

.alert-input {
  @include padding(10px, 0);

  box-sizing: border-box;

  width: 100%;

  border: 0;
  font: inherit;

  background: inherit;
}

.alert-button-group {
  display: flex;

  flex-direction: row;

  width: 100%;
}

.alert-button-group-vertical {
  flex-direction: column;
  flex-wrap: nowrap;
}

.alert-button {
  @include margin(0);

  z-index: 0;
  display: block;

  border: 0;

  font-size: $alert-button-font-size;
  line-height: $alert-button-line-height;
}

.alert-button-inner {
  display: flex;

  flex-flow: row nowrap;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;

  width: 100%;
  height: 100%;
}

.alert-tappable {
  @include text-align(start);
  @include appearance(none);
  @include margin(0);
  @include padding(0);

  width: 100%;

  border: 0;

  font-size: inherit;
  line-height: initial;
  background: transparent;
}

.alert-button,
.alert-checkbox,
.alert-input,
.alert-radio {
  &:active,
  &:focus {
    outline: none;
  }
}

.alert-radio-icon,
.alert-checkbox-icon,
.alert-checkbox-inner {
  box-sizing: border-box;
}
